﻿@model ShopKart.Areas.Admin.Models.CategoryVm

<table class="table table-striped table-bordered table-hover" id="sample_1">
    <thead>
        <tr style="height: 50px">
            <th>
                Category Name
            </th>
            <th>
                Parent Category
            </th>
            <th width="10%" nowrap>
                Action
            </th>
        </tr>
    </thead>
    <tbody>
        @foreach (var category in Model.Categories)
        {
            <tr class="odd gradeX">
                <td>
                    @(category.CategoryName)
                </td>
                <td>
                    @if (category.ParentCategory != null)
                    {
                        @category.ParentCategory.CategoryName
                    }
                </td>
                <td>
                    <a data-id="@category.CategoryId" title="Edit" data-toggle="modal" href="#" class="btn btn-icon-only red btnAddCategory">
                        <i class="fa fa-edit"></i>
                    </a>
                    <a data-id="@category.CategoryId" title="Delete" href="javascript:;" class="btn btn-icon-only purple btnDeleteCategory">
                        <i class="fa fa-times"></i>
                    </a>
                </td>
            </tr>
        }
    </tbody>
</table>
